﻿using AutoMapper;
using K9Nano.Domain;
using K9Nano.Runtime;
using Microsoft.Extensions.Logging;

namespace K9Nano.Application
{
    public abstract class K9ApplicationService: IApplicationService
    {
        public readonly IUnitOfWork Uow;
        public readonly IMapper Mapper;
        public readonly ISessionContext SessionContext;
        public readonly ILogger Logger;

        protected K9ApplicationService(IUnitOfWork uow, IMapper mapper,ISessionContext sessionContext, ILoggerFactory loggerFactory)
        {
            Uow = uow;
            Mapper = mapper;
            SessionContext = sessionContext;
            Logger = loggerFactory.CreateLogger(this.GetType());
        }
    }
}